<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button>按钮</button>
    <input type="text" value="请输入内容" >
</body>
<script>

    var btn = document.querySelector('button')
    var input = document.querySelector('input')

    btn.onclick = function () {
        input.value = '我被点击了';
        this.disabled = true;
    }


</script>

</html>